Skip to content

Improvement/security - #545

Open
zfoong wants to merge 49 commits into
V1.4.6from
improvement/security
Open

zfoong wants to merge 49 commits into
V1.4.6from
improvement/security

Conversation

@zfoong

@zfoong zfoong commented Nov 25, 2026

Copy link
Copy Markdown
Collaborator

What and why?
Hardens CraftBot security through configuration. CraftBot reads email, web pages and chat, then acts with the user's shell, files and accounts, so one planted instruction could run commands, leak keys or message people. This adds an action gate, modelled on OpenClaw and Hermes Agent, that judges every action by what it declares it does. Some protections are always on: destructive commands are refused, outside content is marked as data, secrets are masked in logs, there is a tamper-evident audit log, and Discord owners are matched by user ID. Opt-in protections:

  • limiting what other people's messages and scheduled tasks can do;
  • reviewing risky commands;
  • keeping keys, credentials and .env files away from the agent's tools;
  • blocking private network addresses;
  • hiding secrets in tool results;
  • quarantining memory written from outside content;
  • scanning skills, MCP packages and downloads;
  • optional approval of risky actions.

The opt-in protections are off by default, so existing users keep today's behaviour and speed unless they raise the level. The branch also fixes the MCP tool-name code execution issue (#540).

…nt command, and serve the session token to browsers only.
…t Strict, confine their writes to the workspace.
…rs by unique username with a required mention at higher levels.
…d while keeping chats, memory and the audit log.
…ction, the audit log and Discord owner matching by ID always on, and remove them from the Security settings.
…stem credential protection in the file tools, per-command session approvals and visible hidden characters on approval cards.
…ication for the programs CraftBot downloads.
…of chat-template tokens from outside content.
…n from outside content out of the prompt until the user trusts them in the Security check.
… off or a reviewer model with it on, and refuses risky environment overrides.
…f schedule prompts when created and run, and of memory files when the agent writes them.
…from opening private addresses, including redirects and page-triggered navigations.
…d all languages, the risky-command reason on approval cards, and document them.
…and cut the file guard's cost per call by reusing resolved folders.
…y checks, keep long test ids short, read the home folder from USERPROFILE in tests, and recognise Windows home paths in the risky-command rules.
…ckage loaded by an earlier test cannot hide the test's settings.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant